import ReactDOM from 'react-dom/client';
import App from './App';
import './styles.css';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import LeaferEditor from '@/pages/LeaferEditor';
import { NextUIProvider } from '@nextui-org/react';

const router = createBrowserRouter([
  {
    path: '/',
    element: <App />,
  },
  {
    path: '/editor',
    element: <LeaferEditor />,
  },
]);

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  // <React.StrictMode>
  //   <RouterProvider router={router} />
  // </React.StrictMode>
  <NextUIProvider>
    <main className="light text-foreground bg-background">
      <RouterProvider router={router} />
    </main>
  </NextUIProvider>
);
